-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataGridPro] Fetch new rows only once when multiple models are changed in one cycle #16101
base: master
Are you sure you want to change the base?
Conversation
Deploy preview: https://deploy-preview-16101--material-ui-x.netlify.app/ |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
679f628
to
d5c8643
Compare
d5c8643
to
1251740
Compare
695e46e
to
25fd944
Compare
It looks like that |
That's super weird. This might be a symptom of an issue on our side. I'll take a look at it to better understand what's going on there. |
const { fetchRows } = mockServer; | ||
|
||
// Reuse the same stub between rerenders to properly count the calls | ||
fetchRowsSpy = useLazyRef(() => stub()).current; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason setProps
was causing issues is that fetchRowsSpy
was recreated on each TestDataSource
rerender 😅
I've fixed that and reverted back the usage of setProps
.
Some tests will probably fail though, but IMO in that case there's something wrong with the test or implementation.
Extracted from the work in #15378
It is also needed in #15548
This way, it will be easier to cherry pick it to v7